const mongoose = require('mongoose');

const schema = new mongoose.Schema({
  movieId: {type: String },
  movieName: { type: String },
  cover: { type: String },
  score: { type: Number, default: 0 },
  counts: { type: Number, default: 0 },
  originaName: { type: String },
  movieUrl: { type: String },
  info: { type: String }, 
  releaseDate: { type: String },
  totalTime: { type: String },
  plotDesc: { type: String },
  plotsWords: [
    {
      autor: {type: String},
      actorRole: {type: String},
      imgUrl: {type: String}
    }
  ],
  plotsImg: [
    {
      imgUrl: {type: String}
    }
  ]
})

module.exports = mongoose.model('Movie', schema);

/*
{
    movieId: 0,
    movieName: "蝙蝠侠:黑暗骑士崛起",
    cover: "http://122.152.205.72:88/superhero/DC/BatManTheDarkKnightRises/cover.jpg",
    movieUrl: "http://122.152.205.72:88/superhero/DC/BatManTheDarkKnightRises/trailer.mp4",
    score: 9.1,
    counts: 7561,
    originaName: "原名：The Dark Knight Rises",
    info: "2018 / 美国 / 科幻 / 超级英雄",
    releaseDate: "上映时间：2012-08-27(中国大陆)",
    totalTime: "影片时长：165分钟(中国大陆)",
    plotDesc: "间，哥谭市在戈登警…",
    plotsWords: [{
        imgUrl: "http://122.152.205.72:88/group1/M00/00/04/CpoxxFw9g_SAERa_AAIdXgg7sAA866.png",
        autor: "克里斯托弗·诺兰",
        actor_role: "导演"
      },
      {
        imgUrl: "http://122.152.205.72:88/group1/M00/00/04/CpoxxFw9hHaAPrzeAAGSYIU5LMY971.png",
        autor: "克里斯蒂安·贝尔",
        actor_role: "饰 蝙蝠侠"
      },
      {
        imgUrl: "http://122.152.205.72:88/group1/M00/00/04/CpoxxFw9hRCAfWvJAAEiuCYHmqc426.png",
        autor: "迈克尔·凯恩",
        actor_role: "饰 阿尔弗雷德"
      },
      {
        imgUrl: "http://122.152.205.72:88/group1/M00/00/04/CpoxxFw9iPiANJMuAAFfTCMLYlQ277.png",
        autor: "安妮·海瑟薇",
        actor_role: "饰 猫女"
      }
    ],
    plotsImg: [
      "http://122.152.205.72:88/superhero/DC/BatManTheDarkKnightRises/photos/1.jpg",
      "http://122.152.205.72:88/superhero/DC/BatManTheDarkKnightRises/photos/2.jpg",
      "http://122.152.205.72:88/superhero/DC/BatManTheDarkKnightRises/photos/3.jpg"
    ]
  },


*/